public class TaskTest extends Processor {
    static int i = 0, ii = 0;
    static long j = 0, tmo = 100;

    public static void main() {
	new Task("TaskTest.task1");
	new Task("TaskTest.task2");

	_clock(4000000);

        Task.run();
    }

    static void task1() {
	for (;;) {
	    Task.sleep(tmo); // 1000 ms
	    if (j >= 50) { stop(); }
	}
    }

    static void task2() {
	for (;;) {
	    Task.sleep(10000); // 1000 ms
	    j++;
	}
    }

    static void stop() {
	for(;;);
    }
}
